﻿Public Class BaoCaoDAO
    Public Shared Function SelectAll() As DataTable
        Dim strSQL As String = "select * from BAOCAO"
        Dim dt As DataTable
        dt = Provider.ExecQuery(strSQL)
        Return dt
    End Function

    Public Shared Sub Insert(ByVal _bc As BaoCaoDTO)
        Dim strSQL As String = "Insert into BAOCAO(MaGV, TongNgayDay, TongSoTiet, MaThanhTich)  Values(" & _bc.MaGV & "," & _bc.TongNgayDay & "," & _bc.TongSoTiet & "," & _bc.MaThanhTich & ")"
        Provider.ExecNoneQuery(strSQL)
    End Sub

    Public Shared Sub Delete(ByVal _bc As BaoCaoDTO)
        Dim strSQL As String = "delete from BAOCAO where MaBC = " & _bc.MaBC
        Provider.ExecNoneQuery(strSQL)
    End Sub

    Public Shared Sub Update(ByVal _bc As BaoCaoDTO)
        Dim strSQL As String = "Update BAOCAO set MaThanhTich = " & _bc.MaThanhTich & " where MaBC = " & _bc.MaBC
        Provider.ExecNoneQuery(strSQL)
    End Sub
End Class
